﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Business.IManager;
using System.Data;
using Entity;
using DataAccess.Service;
using DataAccess.IService;
using System.Collections;

namespace Business.Manager
{
    public class AcademyManager : IAcademyManager
    {
        IAcademyService academyService = new AcademyService();
        public DataTable getAcademyTable()
        {
            return academyService.getAcademyTable();
        }

        public Hashtable getAcademyHashtable()
        {
            return academyService.getAcademyHashtable();
        }
        public DataSet getObjectMajor()
        {

            return academyService.selectMajor();

        }


        public List<String> getStudentIds(PaymentProject project)
        {
            List<string> studentIds = new List<string>();
            if (project.ProjectTypeId == 1)
            {
                studentIds = academyService.getTargetByFirMaj(project.Target);
            }
            else if (project.ProjectTypeId == 2)
            {
                studentIds = academyService.getTargetBySecMaj(project.Target);
            }
            return studentIds;
        }
        


        public DataSet getObjectMajor(string acadamyId)
        {
            return academyService.getMajor(acadamyId); ;
        }

        public DataSet getObejctAccadamy()
        {
            return academyService.getAccadamy();
        }
        
        public DataTable getMajorTable()
        {
            return academyService.getMajorTable();
        }

        public Hashtable getMajorHashtable()
        {
            return academyService.getMajorHashtable();
        }


        public DataSet getClassSetByMajorIdAndGrade(String majId, int grade)
        {
            return academyService.getClassSetByMajorIdAndGrade(majId,grade);
        }
    }
}
